﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using ZFS.Library;
using ZFS.Model;
using ZFSData.InterFace;

namespace ZFSData.Manager
{
    /// <summary>
    /// 字典管理
    /// </summary>
    public class DictionaryManager : BaseDal<tb_Dictionary>, IDictionary
    {
        public bool ExistEntity(tb_Dictionary entity)
        {
            return base.ExistEntity(ExpressionHelper.GenerateQueryExp(entity));
        }

        public List<tb_Dictionary> GetDictionarys()
        {
            throw new NotImplementedException();
        }

        public List<tb_Dictionary> GetModels(tb_Dictionary search)
        {
            return base.GetModels(ExpressionHelper.GenerateQueryExp(search));
        }

        public List<tb_Dictionary> GetPagingModels(int pageIndex, int pageSize, out int totalCount, tb_Dictionary search, bool Asc = false)
        {
            Expression<Func<tb_Dictionary, int>> orderexp = x => x.isid;
            return base.GetPagingModels(pageIndex, pageSize, out totalCount, ExpressionHelper.GenerateQueryExp(search), orderexp, Asc);
        }
    }
}
